<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>请假申请</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/static/layui/css/layui.css" media="all" />
    <script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript" src="/static/layui/layui.js"></script>
    <script type="text/javascript" src="/static/js/base.js"></script>
</head>
<body>
<div style="margin: 15px;">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend align="top">请假申请</legend>
    </fieldset>
    <form class="layui-form" id="formID" name="formName" >
        <div class="layui-form-item">
            <label class="layui-form-label">申请部门</label>
            <div class="layui-inline" style="width: 500px;">
                <select lay-verify="required" name="type" id="type" >
                    <option value="">请选择部门</option>
                    <option value="事假">市场部</option>
                    <option value="病假">业务部</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">申请时间</label>
            <div class="layui-input-block">
                <input style="width:500px" type="text" name="beginTime" id="test5" lay-verify="required" placeholder="请选择申请时间！" autocomplete="off" class="layui-input" onclick="layui.laydate({elem: this,istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">申请人</label>
            <div class="layui-input-block">
                <input style="width:500px" type="text" name="endTime" id="endTime" lay-verify="required" placeholder="申请人！" autocomplete="off" class="layui-input" onclick="layui.laydate({elem: this,istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-block">
                <input style="width:500px" id="time" type="text" name="time" lay-verify="required" value="" placeholder="联系电话..." autocomplete="off" class="layui-input" onclick="diff()">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">维修内容及原因</label>
            <div class="layui-input-block">
                <textarea style="width:500px;" name="reason" required lay-verify="required" placeholder="请输入" class="layui-textarea"></textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">审批人</label>
            <input type="text" class="layui-input" id="treeName" name="approver" lay-verify="required" placeholder="请选择审批人（最多选择3个）"  style="width: 500px;">
            <div id="treeContainer" class="layui-input-block">
                <ul id="treeConfig" class="ztree"></ul>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">抄送人</label>
            <input type="text" class="layui-input" id="treeNameCopy1" name="copyMan" placeholder="请选择抄送人"  style="width: 500px;">
            <div id="treeContainerCopy1" class="layui-input-block">
                <ul id="treeConfigCopy1" class="ztree"></ul>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button id="submit" class="layui-btn" type="submit" lay-submit="" lay-filter="submit">
                    <i class="layui-icon">&#xe618;</i>立即提交
                </button>
                <button type="reset" class="layui-btn layui-btn-primary">
                    <i class="layui-icon">&#x1002;</i>重置
                </button>
                <button onclick="back()" type="button" class="layui-btn layui-btn-primary">
                    <i class="layui-icon">&#xe65c;</i>返回
                </button>
            </div>
        </div>
    </form>
</div>
<script>
    //返回
    function back(){
        location.href="/sponsor/showSponsor";
    }


    layui.use(['form', 'jquery', 'layedit', 'laydate','upload'], function() {

        var laydate = layui.laydate;

        laydate.render({
            elem: '#test5'
            ,type: 'datetime'
        });

    });

</script>
</body>

</html>